package com.nulldev.util.networking.async2.tcp.listeners.exceptions;

import com.nulldev.util.networking.async2.tcp.listeners.packets.OutgoingTCPClientConnectionPacket;

public class OutgoingPacketFailedException extends Exception {

	private static final long serialVersionUID = -6991865517295828989L;
	private final OutgoingTCPClientConnectionPacket fPacket;

	public OutgoingPacketFailedException(OutgoingTCPClientConnectionPacket packet) {
		super("Outgoing packet failed.");
		fPacket = packet;
	}

	/**
	 * Returns the failed packet.
	 *
	 * @return the failed packet.
	 */
	public OutgoingTCPClientConnectionPacket getPacket() {
		return fPacket;
	}
}